import request from '@/utils/request'

// 文档内容列表
export function listContentInfo(params){
  return request({
    url:'/docCont/list',
    method:'get',
    params:params
  })
}

// 文档内容保存
export function contentInfoSave(data){
  return request({
    url:'/docCont',
    method:data.contId?'put':'post',
    data:data
  })
}

// 文档内容详情
export function detailContentInfo(id) {
  return request({
    url: '/docCont/'+id,
    method: 'get'
  })
}

// 文档内容删除
export function deleteContentInfo(ids) {
  return request({
    url: '/docCont/'+ids,
    method: 'delete'
  })
}

// 设置排序
export function setSort(info){
  return request({
    url:'/docCont/setSort',
    method:'post',
    data:info
  })
}

// 设置正在编辑
export function setIsEditing(info){
  return request({
    url:'/docCont/setEditing',
    method:'post',
    data:info
  })
}

// 取消正在编辑
export function cancelIsEditing(info){
  return request({
    url:'/docCont/cancelEditing',
    method:'post',
    data:info
  })
}